package com.hh.goodsmanage.action;

import org.springframework.beans.factory.annotation.Autowired;

import com.hh.baseframework.util.base.BaseServiceAction;
import com.hh.goodsmanage.bean.GoodsmanageOut;
import com.hh.goodsmanage.service.impl.GoodsmanageOutService;
import com.hh.system.service.impl.BaseService;

@SuppressWarnings("serial")
public class ActionGoodsmanageOut extends BaseServiceAction<GoodsmanageOut> {
	@Autowired
	private GoodsmanageOutService service;
	private String year;
	private String month;
	private int chartType;

	public BaseService<GoodsmanageOut> getService() {
		return service;
	}

	public void chart() {
		if (chartType == 0) {
			this.returnResult(service.dayChar(year,month));
		} else if (chartType == 1) {
			this.returnResult(service.monthChar(year));
		} else {
			this.returnResult(service.yearChar(year));
		}
	}

	public void findYear() {
		this.returnResult(service.findYear());
	}

	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public int getChartType() {
		return chartType;
	}

	public void setChartType(int chartType) {
		this.chartType = chartType;
	}

	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

}